package com.sky.mapper;

import com.sky.entity.Setmeal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface WorkCenterMapper {


    @Select("select count(*) from setmeal")
    Setmeal allSetmeals();

    @Select("select count(*) from setmeal where status = 1")
    Integer getSoldSetmeals();

    @Select("select count(*) from setmeal where status = 0")
    Integer getDiscontinuedSetmeals();

    @Select("select count(*) from dish where status = 1")
    Integer getSoldDishes();

    @Select("select count(*) from dish where status = 0")
    Integer getDiscontinuedDishes();

    @Select("select count(*) from orders where status = 2")
    Integer getWaitingOrders();

    @Select("select count(*) from orders where status = 3")
    Integer getDeliveredOrders();

    @Select("select count(*) from orders where status = 4")
    Integer getCompletedOrders();

    @Select("select count(*) from orders where status = 5")
    Integer getCancelledOrders();

    @Select("select count(*) from orders")
    Integer getAllOrders();
}
